-- check_stand_time
--
local import = import
---@type behavior_ret
local bret = import("bt/bt_plugin/behavior3/behavior_ret")
---@type api
local api = import("api/api")

local M = {
    name = "check_stand_time",
    type = "Condition",
    desc = "检查站立时间",
    args = {
        { "time", "int?", "站立时间" },
        --{
        --    name = "",
        --    type = "enum",
        --    desc = "目标类型",
        --    options = {
        --        {
        --            name = "",
        --            value = "",
        --        },
        --    },
        --},
    },
    output = {},
}

function M.run(node, env, value)
    -- node.args.time
    local owner = env.owner
    if owner.standTime and owner.standTime >= node.args.time then
        return bret.SUCCESS
    end
    return bret.FAIL
end

return M
